// let GameClient = 

let socket = require("socket.io")
cc.Class({
    extends: cc.Component,

    properties: {
        serverAddr: {
            default: '',
        },
        serverPort: {
            default: '24001',
        },
    },

    // use this for initialization
    onLoad: function () {
        // if (!cc.gameClient) {
        //     cc.gameClient = new GameClient()
        //     cc.gameClient.serverAddr = this.serverAddr
        //     cc.gameClient.serverPort = this.serverPort
        //     cc.gameClient.onLoad()
        // }
        //
        // this.errorLabel = cc.find("ErrorLabel")
        // // console.log("errorLabel", this.errorLabel, this.errorLabel.enabled)
        // // this.errorLabel.active = false
        // this.chatItems = new Array()

        let scene = cc.director.getScene()
        console.log("GoWorld onLoad: ", scene.name)

        // let s = new socket();
        // s.connect(this.serverAddr,this.serverPort)

    //    require("init")
    },
    login : function(){
        var mobile = "15808479339"
        var password = "qqqqqq"
        window.HttpHelper.httpPost("http://127.0.0.1:8881/user",{},function(rsp){
            cc.log([rsp,199999])
        })
    },


})